<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>劳动教育主题网站</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" rel="stylesheet">
    <link rel="stylesheet" href="style.css">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#E63946', // 柔和红色
                        secondary: '#1D3557', // 深蓝色
                        light: '#F1FAEE', // 浅色背景
                        accent: '#A8DADC', // 浅蓝色
                        neutral: '#457B9D', // 中性色
                    },
                    fontFamily: {
                        sans: ['Inter', 'system-ui', 'sans-serif'],
                    },
                }
            }
        }
    </script>
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .nav-link {
                @apply block py-2 px-4 rounded-md transition-all duration-300 hover:bg-primary/10 hover:text-primary;
            }
            .nav-link.active {
                @apply bg-primary/10 text-primary font-medium;
            }
            .section-card {
                @apply bg-white rounded-xl shadow-lg p-6 transition-all duration-300 hover:shadow-xl;
            }
            /* 新增社交图标组悬停效果 */
            .social-icon-group:hover .wechat-qrcode,
            .social-icon-group:hover .weibo-qrcode,
            .wechat-qrcode:hover,
            .weibo-qrcode:hover {
                @apply opacity-100 visible pointer-events-auto;
            }      
        }
    </style>
</head>
<body class="bg-light min-h-screen flex flex-col">
    <!-- 头部区域 -->
    <header class="h-[8rem] bg-gradient-to-r from-primary/90 to-secondary/90 text-white shadow-md">
        <div class="container mx-auto px-4 h-full flex items-center justify-between">
            <div class="flex items-center space-x-3">
                <img src="../主页/img/image.png" alt="" class="w-[33vw] mx-4 object-contain">
                <h1 class="text-2xl md:text-3xl font-bold tracking-tight">劳动教育<span class="text-accent">实践平台</span></h1>
            </div>
        <nav class="hidden md:flex space-x-8 items-center">
            <!-- 添加text-lg md:text-xl类调整字体大小 -->
            <a href="../主页/layout.html" class="text-lg md:text-xl font-bold text-white hover:text-accent transition-colors duration-300">首页</a>
            <a href="../活动报道/近期活动.html" class="text-lg md:text-xl font-bold text-white hover:text-accent transition-colors duration-300">活动报道</a>
            <a href="../专业劳动案例/优秀案例.html" class="text-lg md:text-xl font-bold text-white hover:text-accent transition-colors duration-300">专业劳动案例</a>
            <a href="../学生心得/学生心得.html" class="text-lg md:text-xl font-bold text-white hover:text-accent transition-colors duration-300">学生心得</a>
        </nav>

            <button class="md:hidden text-white text-2xl">
                <i class="fa-solid fa-bars"></i>
            </button>
        </div>
    </header>

    <!-- 主要内容区域 -->
    <article class="flex-grow flex flex-col md:flex-row container mx-auto px-4 py-6 gap-6">
        <!-- 左侧导航栏 -->
        <aside class="w-full md:w-auto bg-white rounded-xl shadow-md p-4 shrink-0">
            <ul class="space-y-1 min-w-[180px]">
                <li><a href="./学生心得.html" class="nav-link active flex items-center"><i class="fa-solid fa-book mr-2"></i>学生心得</a></li>
                <!-- <li><a href="./成果展示.html" class="nav-link flex items-center"><i class="fa-solid fa-calendar mr-2"></i>成果展示</a></li> -->
                <!-- <li><a href="#" class="nav-link flex items-center"><i class="fa-solid fa-calendar mr-2"></i>实践活动</a></li>
                <li><a href="#" class="nav-link flex items-center"><i class="fa-solid fa-trophy mr-2"></i>学生作品</a></li>
                <li><a href="#" class="nav-link flex items-center"><i class="fa-solid fa-question-circle mr-2"></i>常见问题</a></li>
                <li><a href="#" class="nav-link flex items-center"><i class="fa-solid fa-envelope mr-2"></i>联系我们</a></li> -->
            </ul>
        </aside>

        <!-- 中间内容区 -->
        <section class="flex-grow space-y-6 h-[66.67vh] bg-white rounded-xl shadow-md p-6">
            <div class="section-card -translate-y-4">
                <!-- 原有内容保持不变 -->
                 
            <div class="right-content">
            <div class="notice-item">
                <a href="../学生心得/详情页面/详情页面1.html">"践行劳动教育，创建文明宿舍"学生心得</a>
                <span class="date">2025-04-23</span>
            </div>
            <div class="notice-item">
                <a href="#">"爱老敬老文明实践活动"学生心得</a>
                <span class="date">2025-03-31</span>
            </div>
            <div class="notice-item">
                <a href="#">“宠物义诊进社区，文明养宠伴我行”文明实践活动学生心得</a>
                <span class="date">2025-03-24</span>
            </div>
            <div class="notice-item">
                <a href="#">戏曲艺术学院到辛庄社区开展文明实践活动学生心得</a>
                <span class="date">2024-11-25</span>
            </div>
            <div class="notice-item">
                <a href="#">药学与检验系开展寒假社会实践活动交流会学生心得</a>
                <span class="date">2024-10-24</span>
            </div>
            <div class="notice-item">
                <a href="#">我校2024年新时代文明实践活动学生心得</a>
                <span class="date">2024-10-06</span>
            </div>
            </div>
            <!-- 新增分页组件 -->
            <div class="pagination flex justify-center gap-4 mt-8 mb-6">
                <button class="prev-btn px-4 py-2 bg-primary text-white rounded hover:bg-primary/80 disabled:opacity-50">上一页</button>
                <div class="pages flex gap-2"></div>
                <button class="next-btn px-4 py-2 bg-primary text-white rounded hover:bg-primary/80 disabled:opacity-50">下一页</button>
            </div>
        </section>
    </article>

    <!-- 页脚区域 -->
    <footer class="bg-gradient-to-r from-primary/90 to-secondary/90 pt-6 mt-auto">  <!-- 修改为pt-6并添加mt-auto -->
        <div class="container mx-auto px-4" style="display: flex; justify-content: center;">
            <div class="flex flex-col items-center space-y-4 pb-4">  <!-- 修改为items-center -->
                <!-- 社交链接 -->
                <div class="flex space-x-8 justify-start">
                    <div class="social-icon-group relative">
                        <a href="#" class="text-white hover:text-accent transition-colors duration-300 flex flex-col items-center">
                            <i class="fa-brands fa-weixin text-2xl"></i>
                            <span class="text-sm mt-1">微信公众号</span>
                        </a>
                        <div class="wechat-qrcode absolute bottom-full left-1/2 -translate-x-1/2 mb-2 bg-white p-3 rounded-lg shadow-xl opacity-0 invisible transition-all duration-300 pointer-events-none w-32 z-50">
                            <img src="../主页/img/wechat.png" alt="微信公众号" class="w-full h-auto object-cover">
                            <div class="text-sm text-center text-gray-700 mt-2">扫码关注公众号</div>
                        </div>
                    </div>
                    
                    <div class="social-icon-group relative">
                        <a href="#" class="text-white hover:text-accent transition-colors duration-300 flex flex-col items-center">
                            <i class="fa-brands fa-weibo text-2xl"></i>
                            <span class="text-sm mt-1">官方微博</span>
                        </a>
                        <div class="weibo-qrcode absolute bottom-full left-1/2 -translate-x-1/2 mb-2 bg-white p-3 rounded-lg shadow-xl opacity-0 invisible transition-all duration-300 pointer-events-none w-32 z-50">
                            <img src="../主页/img/weibo.png" alt="官方微博" class="w-full h-auto object-cover">
                            <div class="text-sm text-center text-gray-700 mt-2">关注官方微博</div>
                        </div>
                    </div>
                </div>

                <!-- 版权信息 -->
                <div class="flex justify-center gap-8 pb-2">  <!-- 修改为justify-center -->
                    <div class="text-sm text-white">
                        &copy; 2025 劳动教育实践平台 - 版权所有 
                    </div>
                </div>
            </div>
        </div>
    </footer>

    <script>
        // 导航栏滚动效果
        window.addEventListener('scroll', function() {
            const header = document.querySelector('header');
            if (window.scrollY > 50) {
                header.classList.add('bg-primary/95', 'shadow-lg');
                header.classList.remove('bg-gradient-to-r', 'from-primary/90', 'to-secondary/90');
            } else {
                header.classList.remove('bg-primary/95', 'shadow-lg');
                header.classList.add('bg-gradient-to-r', 'from-primary/90', 'to-secondary/90');
            }
        });

        // 平滑滚动
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                document.querySelector(this.getAttribute('href')).scrollIntoView({
                    behavior: 'smooth'
                });
            });
        });
    
        let currentPage = 1;
        const itemsPerPage = 5;
        const noticeItems = document.querySelectorAll('.notice-item')
        const totalPages = Math.ceil(noticeItems.length / itemsPerPage)
        const initPagination = () => {
            const pageContainer = document.querySelector('.pages')
            for (let i = 1; i <= totalPages; i++) {
                pageContainer.innerHTML += `
                    <span class="page-number px-4 py-2 bg-gray-100 
                    rounded cursor-pointer hover:bg-primary/20">${i}</span>
                `
            }
            updatePagination()
        }
        const updatePagination = () => {
            document.querySelectorAll('.page-number').forEach(page => {
                page.classList.toggle('bg-primary', Number(page.textContent) === currentPage)
                page.classList.toggle('text-white', Number(page.textContent) === currentPage)
            })
            document.querySelector('.prev-btn').disabled = currentPage === 1
            document.querySelector('.next-btn').disabled = currentPage === totalPages
            noticeItems.forEach((notice, idx) => {
                notice.style.display = (idx >= (currentPage - 1) * itemsPerPage
                && idx < currentPage * itemsPerPage) ? 'block' : 'none'
            })
        }   
        document.querySelector('.prev-btn').addEventListener('click', () => {
            changePage(currentPage - 1)
        })
        document.querySelector('.next-btn').addEventListener('click', () => {
            changePage(currentPage + 1)
        })
        const changePage = page => {
            currentPage = page
            updatePagination()
        }
        initPagination()
    </script>
</body>
</html>